package cn.xo68.ide.plugin.common.action;


import cn.xo68.ide.plugin.common.component.ToolSuiteConsole;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

public class ToolSuiteLogCleanConsoleAction extends AnAction {
  public ToolSuiteLogCleanConsoleAction(@Nullable String text, @Nullable String description, @Nullable Icon icon) {
    super(text, description, icon);
  }

  @Override
  public void actionPerformed(AnActionEvent e) {
    if(e.getProject()!=null) {
      e.getProject().getComponent(ToolSuiteConsole.class).clear();
    }
  }
}
